package poker;
import java.awt.Image;
import java.awt.Toolkit;
import java.io.Serializable;

public class Kaart implements Serializable
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 2661643532736483833L;
	public final static int CLUBS = 1;
	public final static int SPADES = 2;
	public final static int HEARTS = 3;
	public final static int DIAMONDS = 4;
	
	public final static int ACE = 14;
	public final static int KING = 13;
	public final static int QUEEN = 12;
	public final static int JACK = 11;
	
	
   private int kleur;
   private int nummer;
   
   public Kaart( int k, int n )
   {
	   kleur = k;
	   nummer = n;
   }
   
   public int getKleur()
   {
		return kleur;
   }
   
   public int getNummer()
   {
		return nummer;
   }
   
   public Image getImage()
   {
		return Toolkit.getDefaultToolkit().getImage("img/" + kleur + "-" + nummer + ".png");
   }
   
   public String getKrt()
   {
	   String k = "";
	   String n = "";
	   if(kleur == 1)
		   k = "Clubs";
	   if(kleur == 2)
		   k = "Spades";
	   if(kleur == 3)
		   k = "Hearts";
	   if(kleur == 4)
		   k = "Diamonds";

	   if(nummer == 11)
		   n = "Jack";
	   else if(nummer == 12)
		   n = "Queen";
	   else if(nummer == 13)
		   n = "King";
	   else if(nummer == 14)
		   n = "Ace";
	   else
		   n = "" + nummer;
	   return n + " of " + k;
   }
   
   public String toString()
   {
	   return "Kaart(kleur: " + kleur + ", nummer: " + nummer + ")";
   }
}
